<template>
    <div>
     <button v-for="(item,index) in arr" :key="index" @click="is(item.id)">{{item.name}}</button>
     <slot :name="tab"></slot>
     <slot name="arr" :shuzu="arr2"></slot>
    </div>
</template>
<script>

export default {
    data(){
        return{
         tab:"one",   
         arr:[{id:"one",name:"娱乐新闻"},{id:'two',name:"军事新闻"},{id:"three",name:"政治新闻"}],
         arr2:[1,2,3,4,5,6]
        }
    },
    methods:{
        is(id){
         this.tab = id
         console.log(this.tab); 
        }
    }
}
</script>
<style>
</style>
